<?php
declare (strict_types = 1);

namespace app\common\model;

use think\Model;
use think\model\concern\SoftDelete;
class ChoujiangSendemail extends Model
{
    use SoftDelete;
     protected $deleteTime = "delete_time";
    // 获取列表
    public static function getList()
    {
        $where = [];
        $limit = input('get.limit');
        
               //按物品名称查找
               if ($goodsname = input("goodsname")) {
                   $where[] = ["goodsname", "like", "%" . $goodsname . "%"];
               }
               //按区服名称查找
               if ($servername = input("servername")) {
                   $where[] = ["servername", "like", "%" . $servername . "%"];
               }
               //按玩家账号查找
               if ($palyeraccount = input("palyeraccount")) {
                   $where[] = ["palyeraccount", "like", "%" . $palyeraccount . "%"];
               }
               //按是否发送  1.未发送  2.已发送查找
               if ($issend = input("issend")) {
                   $where[] = ["issend", "like", "%" . $issend . "%"];
               }
               //按qq信息查找
               if ($qqinfo = input("qqinfo")) {
                   $where[] = ["qqinfo", "like", "%" . $qqinfo . "%"];
               }
        $list = self::order('id','desc')->where($where)->paginate($limit);
        return ['code'=>0,'data'=>$list->items(),'extend'=>['count' => $list->total(), 'limit' => $limit]];
    }



   

}
